{% extends "admin/base_site.html" %}

{% load i18n %}

{% block title %}{% trans "Preview message" %}{{ block.super }}{% endblock %}

{% block breadcrumbs %}
<div class="breadcrumbs">
     <a href="../../../../">{% trans "Home" %}</a> &rsaquo;
     <a href="../../../">Newsletter</a> &rsaquo;
     <a href="../../">{% trans "Message" %}</a> &rsaquo;
     <a href="../">{{ message|truncatewords:"18" }}</a> &rsaquo;
     {% trans "Preview" %}
</div>
{% endblock %}


{% block content %}
<h1>{% trans "Preview message" %}</h1>
<div id="content-main">
  <ul class="object-tools">
    <li><a href="{% url 'admin:newsletter_message_change' message.id %}">{% trans "Change" %}</a></li>
    <li><a href="{% url 'admin:newsletter_message_submit' message.id %}">{% trans "Create submission" %}</a></li>
  </ul>
    
    <h4>{% trans "Attachments" %}</h4>
    <ul>
    {% for att in attachments %}
    <li>{{ att.file.name }} ({{ att.file.size|filesizeformat }})</li>
    {% empty %}
    <li>{% trans "No Attachments"%}</li>
    {% endfor %}
    </ul>
    
    {% if message.newsletter.send_html %}
    <h4>{% trans "HTML" %}</h4>
    <iframe src ="{% url 'admin:newsletter_message_preview_html' message.id %}" width="960px" height="720px"></iframe>
    {% endif %}

    <h4>{% trans "Text" %}</h4>
    <iframe src ="{% url 'admin:newsletter_message_preview_text' message.id %}" width="960px" height="720px"></iframe>
</div>
<br/>
<br/>

{% endblock %}
